xen/arm64: Make show_registers working even if current is not correctly set
authorJulien Grall <julien.grall@linaro.org>
Tue, 30 Sep 2014 14:56:53 +0000 (15:56 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 1 Oct 2014 11:10:52 +0000 (12:10 +0100)
commit0e96ab2691e4e83e4e89f826e0d605d5991e1bfa
tree2f5c7116e1353ba9752e7d577561d2779e9cb565
parent3e802c6ca1fb9a9549258c2855a57cad483f3cbd
xen/arm64: Make show_registers working even if current is not correctly set

The commit 8ab802c "xen/arm: Restricted access to IFSR32_EL2 and FPEXC32_EL2"
introduced the use of the variable current in show_registers.

The variable is not correctly set until Xen has finished to boot.
Therefore any call to show_registers will result to crash Xen.

As the register IFSR32_EL2 is only printed when the registers represent
a guest view, Xen can read the value only for this case.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/traps.c